import Vue from 'vue'

// 引入 ECharts 主模块
let echarts = require('echarts/lib/echarts')
// 引入折线图/柱状图等组件
require('echarts/lib/chart/line')
require('echarts/lib/chart/pie')
require('echarts/lib/chart/bar')

// 引入提示框和title等组件，图例
require('echarts/lib/component/angleAxis')
require('echarts/lib/component/axis')
require('echarts/lib/component/axisPointer')
require('echarts/lib/component/brush')
require('echarts/lib/component/calendar')
require('echarts/lib/component/dataset')
require('echarts/lib/component/dataZoom')
require('echarts/lib/component/dataZoomInside')
require('echarts/lib/component/dataZoomSelect')
require('echarts/lib/component/dataZoomSlider')
require('echarts/lib/component/geo')
require('echarts/lib/component/graphic')
require('echarts/lib/component/grid')
require('echarts/lib/component/gridSimple')
require('echarts/lib/component/legend')
require('echarts/lib/component/legendScroll')
require('echarts/lib/component/markArea')
require('echarts/lib/component/markLine')
require('echarts/lib/component/markPoint')
require('echarts/lib/component/parallel')
require('echarts/lib/component/parallelAxis')
require('echarts/lib/component/polar')
require('echarts/lib/component/radar')
require('echarts/lib/component/radiusAxis')
require('echarts/lib/component/singleAxis')
require('echarts/lib/component/timeline')
require('echarts/lib/component/title')
require('echarts/lib/component/toolbox')
require('echarts/lib/component/tooltip')
require('echarts/lib/component/visualMap')
require('echarts/lib/component/visualMapContinuous')
require('echarts/lib/component/visualMapPiecewise')
// 挂载到 Vue 实例上
Vue.prototype['$echarts'] = echarts
